package com.opal.system.mapper.oracle;

import com.opal.system.entity.ClockInQueryForm;
import com.opal.system.entity.table.TbmImportData;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.StatementType;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface TbmImportdataMapper {

    int getCoumt(ClockInQueryForm clockInQueryForm);

    List<TbmImportData> findByID(ClockInQueryForm clockInQueryForm);

    int deleteByID(@Param("id") List<String> id);

    @Select({"call del_duplicate_tbm_importdata(#{map.pkHrorg,mode=IN,jdbcType=VARCHAR}, " +
            "#{map.time,mode=IN,jdbcType=VARCHAR}," +
            "#{map.result,mode=OUT,jdbcType=INTEGER})"})
    @Options(statementType= StatementType.CALLABLE)
    void CallDelDuplicate(@Param("map") Map map);
}
